/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "inventory")
@XmlRootElement(name = "inventory")
@NamedQueries({
    @NamedQuery(name = "Inventory.findAll", query = "SELECT i FROM Inventory i"),
    @NamedQuery(name = "Inventory.findByIdinventoryID", query = "SELECT i FROM Inventory i WHERE i.idinventoryID = :idinventoryID"),
    @NamedQuery(name = "Inventory.findByInventoryName", query = "SELECT i FROM Inventory i WHERE i.inventoryName = :inventoryName"),
    @NamedQuery(name = "Inventory.findByDescription", query = "SELECT i FROM Inventory i WHERE i.description = :description"),
    @NamedQuery(name = "Inventory.findByQuantity", query = "SELECT i FROM Inventory i WHERE i.quantity = :quantity"),
    @NamedQuery(name = "Inventory.findByIsdeleted", query = "SELECT i FROM Inventory i WHERE i.isdeleted = :isdeleted")})
public class Inventory implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "IdinventoryID")
    private Long idinventoryID;
    @Basic(optional = false)
    @Column(name = "InventoryName")
    private String inventoryName;
    @Column(name = "description")
    private String description;
    @Column(name = "quantity")
    private Double quantity;
    @Column(name = "isdeleted")
    private Boolean isdeleted;
    
    @Transient
    private String alreadyExistsMenu;
    
    @Transient
    private String alreadyExistsModifier;
    
    
	public String getAlreadyExistsMenu() {
		return alreadyExistsMenu;
	}

	public void setAlreadyExistsMenu(String alreadyExistsMenu) {
		this.alreadyExistsMenu = alreadyExistsMenu;
	}

	public String getAlreadyExistsModifier() {
		return alreadyExistsModifier;
	}

	public void setAlreadyExistsModifier(String alreadyExistsModifier) {
		this.alreadyExistsModifier = alreadyExistsModifier;
	}

	public Inventory() {
    }

    public Inventory(Long idinventoryID) {
        this.idinventoryID = idinventoryID;
    }

    public Inventory(Long idinventoryID, String inventoryName) {
        this.idinventoryID = idinventoryID;
        this.inventoryName = inventoryName;
    }

    public Long getIdinventoryID() {
        return idinventoryID;
    }

    public void setIdinventoryID(Long idinventoryID) {
        this.idinventoryID = idinventoryID;
    }

    public String getInventoryName() {
        return inventoryName;
    }

    public void setInventoryName(String inventoryName) {
        this.inventoryName = inventoryName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Double getQuantity() {
        return quantity;
    }

    public void setQuantity(Double quantity) {
        this.quantity = quantity;
    }

    public Boolean getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Boolean isdeleted) {
        this.isdeleted = isdeleted;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idinventoryID != null ? idinventoryID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Inventory)) {
            return false;
        }
        Inventory other = (Inventory) object;
        if ((this.idinventoryID == null && other.idinventoryID != null) || (this.idinventoryID != null && !this.idinventoryID.equals(other.idinventoryID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Inventory[idinventoryID=" + idinventoryID + "]";
    }

}
